#! /usr/bin/env python

#THIS COMPONENT SHOULD BE REMOVED EVENTUALLY SINCE WE PLAN ON GETTING
#DJANGO FRAMEWORK WORKING FOR OUR INPUT. THIS IS A PLACEHOLDER

import sys
import halib.Logger as logger
import halib.chaif.DatabaseDriver as ddriver

def initialize():
	logger.subsection("running cli input substitue for web framework")

	# Heartbeat table input
	logger.subsection("heartbeat information")
	secondary_host = raw_input("enter full hostname of secondary server(output of uname -n): ")
	ddriver.insert_db("Heartbeat", "secondary_host", secondary_host)

	# Information that DRBD needs into Secondary_Info table
	logger.subsection("gathering distributed replicated block device(drbd) data")
	device_id  = raw_input("Enter the secondary server device identificaton of your data partition example  /dev/sda0 for scsi disks or /dev/hd[e|a]0 for ide: ")
	ddriver.insert_db("Secondary_Info", "device_id", device_id)

	secondary_ip = raw_input("Enter the ip address of secondary server: ")
	ddriver.insert_db("Secondary_Info", "secondary_ip", secondary_ip)
